package com.hmdp.config;


import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 作者：無言
 * 时间：2022/5/15 21:30
 * 描述：永无BUG
 */

@Configuration
public class RedissonConfig {

    @Bean
    public RedissonClient redissOnClient(){
        //配置
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.237.101:6379").setPassword("975806");
        //创建RedissonClient对象
        return Redisson.create(config);

    }

}
